<?php
get_header();

$layout=ThemexCore::getOption('blog_layout','right');

$address=get_post_meta($post->ID,'_evento_address',true);
$data_inizio=get_post_meta($post->ID,'_evento_data_inizio',true);
$data_fine=get_post_meta($post->ID,'_evento_data_fine',true);

if($layout=='left') {
?>
<div class="column fourcol">
<?php get_sidebar(); ?>
</div>
<div class="column eightcol last">
<?php } else if($layout=='right') { ?>
<div class="column eightcol">
<?php } else { ?>
<div class="fullwidth-block">
<?php } ?>
	<?php 
	if (have_posts()) {
		while ( have_posts() ) {
			the_post();	
			?>
			<div class="post full-post">
				<?php if(has_post_thumbnail()) { ?>
				<div class="post-featured-image">
					<div class="featured-image">
						<a href="<?php the_permalink(); ?>"><img src="<?php echo themex_thumbnail($post->ID,738); ?>" class="fullwidth" alt="<?php the_title(); ?>" /></a>
					</div>
				</div>
				<?php } ?>
				<div class="post-content">
					<div class="block-title"><h1><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h1></div>
					<?php the_content(); ?>
					<div class="post-meta">
						<div class="post-info"><?php if ($data_inizio != '' and $data_fine != '') { ?>Dal <strong><?php echo $data_inizio; ?></strong> al <strong><?php echo $data_fine; } ?></strong></div>
						<div class="post-tags"><?php the_tags('','',''); ?></div>
						<div class="clear"></div>
					</div>
				</div>
				<div class="clear"></div>
			</div>
			<?php
			if (function_exists('gt_google_map')){
				$atts = array('layout' => '');
				echo gt_google_map($atts);
			}
		}
	}
	?>
</div>
<?php if($layout=='right') { ?>
<div class="column fourcol last">
<?php get_sidebar(); ?>
</div>
<?php } ?>
<?php get_footer(); ?>